package com.models;

/**
 * Created by Administrator on 2017/4/12.
 */

import com.alibaba.fastjson.annotation.JSONField;




public class FileSystem extends BaseEntity<Integer> {

    private String fileName;

    public enum Type {input}

    private Type type;


    private String fileKey;

    @JSONField(serialize = false)
    private String path;

    private String downloadPath;

    private String viewPdfPath;


    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }


    public String getDownloadPath() {
        this.setDownloadPath();
        return downloadPath;
    }


    public void setDownloadPath() {
        this.downloadPath = "/api/file/downloadPath/" + this.getFileKey();
    }

    public String getFileKey() {
        return fileKey;
    }

    public void setDownloadPath(String downloadPath) {
        this.downloadPath = downloadPath;
    }

    public String getViewPdfPath() {
        this.setViewPdfPath();
        return viewPdfPath;
    }

    public void setViewPdfPath() {
        this.viewPdfPath = "/api/file/viewPdf/" + this.getFileKey();
    }

    public void setFileKey(String fileKey) {
        this.fileKey = fileKey;
    }
}
